package com.shxt.framework.commons.controller;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.shxt.framework.rbac.user.model.User;
import org.springframework.beans.factory.annotation.Autowired;

public class BaseController {
		@Autowired
		protected HttpServletRequest request;
		@Autowired
		protected HttpServletResponse response;
		@Autowired
		protected HttpSession session;
		@Autowired
		protected ServletContext application;

    public static final String SESSION_USER = "session_user";

    public User getLoginUser() {
        return (User) this.session.getAttribute(SESSION_USER);
    }
}
